package experiment1;

import java.util.Arrays;

/**
 * @Auther:云尚学Java
 *全排列问题
 */
public class Test5 {
    static char[] a={'a','b','c'};
    static char[] b=new char[4];
    public static void main(String args[]){
        f(0);
    }
    public  static void f(int i){
        if(i>=a.length){
            System.out.println(Arrays.toString(a));
            return;
        }else{
            for(int j=i;j<a.length;j++){
                char temp=a[j];
                a[j]=a[i];
                a[i]=temp;
                f(i+1);
                temp=a[j];
                a[j]=a[i];
                a[i]=temp;
            }
        }
    }
}
